#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
@author: wang_chao03
@project: pyraft
@file: log
@time: 2023/2/24
"""

import logging

__all__ = ('logger',)


logger = logging.getLogger('raft')
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
handler.setLevel(logging.DEBUG)
formatter = logging.Formatter(
    '%(asctime)s | %(levelname)-8s | %(module)-10s | %(lineno)-6d - %(message)s'
)
handler.setFormatter(formatter)
logger.addHandler(handler)
